<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Inspire - Admin and Dashboard Template</title>

    <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">

    <link rel="stylesheet" type="text/css" href="/assets/fonts/line-icons.css">

    <link rel="stylesheet" type="text/css" href="/assets/css/main.css">

    <link rel="stylesheet" type="text/css" href="/assets/css/responsive.css">
</head>
<body>
<div class="card-header border-bottom">
    <h4 class="card-title">影厅信息查询</h4>
    <div><h4 th:text="${msg}" class="msg"></h4></div>
</div>
<div class="card-body">
    <div class="row">
        <div class="col-lg-10 col-md-12 col-xs-12">
            <form role="form" id="form-validation" novalidate="novalidate">
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">影厅</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" name="hall" th:value="${cinemaList.hall}">
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">座位总数</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" name="seat" th:value="${cinemaList.seat}">
                    </div>
                </div>

                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">类型</label>
                    <div class="col-sm-9">
                        <select name="type" class="form-control">
                            <option th:selected="${cinemaList.type==0}" th:value="0">imax厅</option>
                            <option th:selected="${cinemaList.type==1}" th:value="1">普通厅</option>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-2 col-form-label control-label">状态</label>
                    <div class="col-sm-9">
                        <select name="state" class="form-control">
                            <option th:selected="${cinemaList.state==0}" th:value="0">正常</option>
                            <option th:selected="${cinemaList.state==1}" th:value="1">维修</option>
                        </select>
                    </div>
                </div>
                <button class="btn btn-common" id="update">修改</button>
                <button class="btn btn-common" id="delete">删除</button>
                <button class="btn btn-common" id="ret">返回</button>
            </form>
        </div>
    </div>
</div>
<script th:inline="javascript">
    $(".msg").slideUp(2000);
    $("#update").bind("click",function () {
        var id = [[${cinemaList.id}]]
        toJump("/cinema/update",$("#form-validation").serialize()+"&id="+id)
    })
    $("#delete").bind("click",function () {
        var id = [[${cinemaList.id}]]
        if(!confirm("确定删除吗?")) return
        toJump("/cinema/delete","&id="+id)
    })
    $("#ret").bind("click",function () {
        toJump("/cinema/query")
    })
</script>
<script src="/assets/js/jquery-min.js"></script>
<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/jquery.app.js"></script>
<script src="/assets/js/main.js"></script>
</body>

</html>